package xpn.platform.modules.sys.worktransfer;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import xpn.platform.common.persistence.AbstractBaseEntity;
import xpn.platform.modules.sys.user.SysUser;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
@Getter
@Setter
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" }, ignoreUnknown = true)
public class WorkTransfer extends AbstractBaseEntity {
    private static final long serialVersionUID = -7964345900760112880L;
    /**
     * 移交用户
     */
    @JoinColumn
    @ManyToOne(fetch = FetchType.LAZY)
    private SysUser from;

    /**
     * 被移交用户
     */
    @JoinColumn
    @ManyToOne(fetch = FetchType.LAZY)
    private SysUser to;
}
